package com.wing.purchase.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.purchase.model.entity.PurQualityTestingTask;
import com.wing.purchase.model.response.PurQualityTestingTaskDetailVo;
import com.wing.purchase.model.response.QualityTimeDetailInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * 采购-质检任务-Dao
 *
 * @author
 */
@Mapper
public interface PurQualityTestingTaskDao extends BaseMapper<PurQualityTestingTask> {

    /**
     * 查询所有的质检任务
     * @param pg 分页参数
     * @param params 参数
     * @return 分页后的质检任务
     */
    List<PurQualityTestingTask> pageList4app(@Param("page") Page<PurQualityTestingTask> pg,@Param("params") Map<String, Object> params);

    /**
     * 查看质检详情
     * @param taskId
     * @return
     */
    PurQualityTestingTaskDetailVo getDetailVoInfoBy(@Param("taskId") String taskId);

    /**
     * 查询时间线
     * @param taskId
     * @return
     */
    QualityTimeDetailInfoVo getTimeInfo(@Param("taskId") String taskId);

    /**
     * 获取结束时间
     * @param id
     * @return
     */
    QualityTimeDetailInfoVo selectLastDetailFinshInfo(@Param("id") Long id);
}
